package com.dabai.opdoubleopen.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.dabai.opdoubleopen.R;
import com.dabai.opdoubleopen.bean.AppBaseInfo;

import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;

public class AppAdapter extends BaseQuickAdapter<AppBaseInfo, BaseViewHolder> {

    public AppAdapter(ArrayList<AppBaseInfo> appBaseInfo) {
        super(R.layout.apps_item,appBaseInfo);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder helper,@NotNull AppBaseInfo appBaseInfo) {
        helper.setText(R.id.textView, appBaseInfo.getAppName());
        helper.setImageBitmap(R.id.imageView,appBaseInfo.getIcon());
    }

}
